import http from "../common/utils/http.js";
const service = "/layer/v1/sys-service";
export default {
  //获取字典列表
  getDictList: (param) => http.get(`${service}/sys/dict/data/query/list`, param),

  /*********************菜单管理***************************************************** */
  // 获取菜单树
  getMenuTree: (param) => http.get(`${service}/sys/menu/tree`, param),
  // 获取菜单列表
  getMenuList: (param) => http.get(`${service}/sys/menu/list`, param),
  //创建系统菜单
  addMenu: (param) => http.post(`${service}/sys/menu/create`, param),
  // 查询菜单详情
  getMenuDetail: (param) => http.get(`${service}/sys/menu/query/detail`, param),
  //编辑系统菜单
  updateMenu: (param) => http.post(`${service}/sys/menu/modify`, param),
  //移除系统菜单
  deleteMenu: (param) => http.post(`${service}/sys/menu/remove`, param),
  //修改菜单状态
  changeMenuStatus: (param) => http.get(`${service}/sys/menu/updateMenuStatus`, param),
  //修改菜单排序-table
  updateMenuOrder: (param) => http.post(`${service}/sys/menu/updateMenuOrderNum`, param),
  //修改菜单排序-tree
  updateMenuTreeOrder: (param) => http.post(`${service}/sys/menu/saveListSort`, param),

  /*********************组织机构***************************************************** */
  // 获取组织机构树
  getDeptTree: (param) => http.get(`${service}/sys/dept/tree`, param),
  // 获取组织列表
  getDeptList: (param) => http.get(`${service}/sys/dept/list`, param),
  // 新增组织
  addDept: (param) => http.post(`${service}/sys/dept/create`, param),
  // 删除组织
  deleteDept: (param) => http.post(`${service}/sys/dept/remove`, param),
  // 获取组织详情
  getDeptInfo: (param) => http.get(`${service}/sys/dept/query/detail`, param),
  // 修改组织信息
  updateDept: (param) => http.post(`${service}/sys/dept/modify`, param),
  // 导出组织列表
  exportDeptList: (param) => http.export(`${service}/sys/dept/exporExcel`, param),
  // 修改组织状态
  changeDeptStatus: (param) => http.post(`${service}/sys/dept/modify/deptStatus`, param),
  // 组织排序-tree
  saveListSort: (param) => http.post(`${service}/sys/dept/saveListSort`, param),
  //组织排序-table
  updateSysDeptOrderNum: (param) => http.post(`${service}/sys/dept/updateSysDeptOrderNum`, param),

  /*********************字典管理***************************************************** */
  // 获取字典类型列表
  getDictTypeList: (param) => http.get(`${service}/sys/dict/type/query/page`, param),
  // 新增字典类型
  addDictType: (param) => http.post(`${service}/sys/dict/type/create`, param),
  // 获取字典类型详情
  getDictTypeDetail: (param) => http.get(`${service}/sys/dict/type/query/detail`, param),
  // 删除字典类型
  deleteDictType: (param) => http.post(`${service}/sys/dict/type/remove`, param),
  // 编辑字典类型信息
  editDictType: (param) => http.post(`${service}/sys/dict/type/modify`, param),
  // 修改字典类型状态
  changeDictTypeStatus: (param) => http.post(`${service}/sys/dict/type/modify/DataTypeStatus`, param),
  // 获取字典列表
  getDictionary: (param) => http.get(`${service}/sys/dict/data/query/page`, param),
  // 新增字典数据
  addDictionary: (param) => http.post(`${service}/sys/dict/data/create`, param),
  // 获取字典详情
  getDictionaryDetail: (param) => http.get(`${service}/sys/dict/data/query/detail`, param),
  // 删除字典数据
  deleteDictionary: (param) => http.post(`${service}/sys/dict/data/remove`, param),
  // 编辑字典数据
  editDictionary: (param) => http.post(`${service}/sys/dict/data/modify`, param),
  // 修改字典数据状态
  changeDictionaryStatus: (param) => http.post(`${service}/sys/dict/data/modify/dictDataStatus`, param),
  // 字典-标签排序
  updateDeptOrderNum: (param) => http.post(`${service}/sys/dict/data/updateDeptOrderNum`, param),

  /*********************权限管理***************************************************** */
  // 获取组织下的用户
  getUserTree: (param) => http.get(`${service}/sys/user/query/deptId`, param),
  // 查询用户权限树
  getUserPermissTree: (param) => http.get(`${service}/sys/acl/module/menu/user/tree`, param),
  // 提交已选择用户权限
  menuUpdate: (param) => http.post(`${service}/sys/acl/module/menu/modify`, param),
  // 查询组织下的角色
  getRoleTree: (param) => http.get(`${service}/sys/role/query/deptId`, param),
  // 查询模块权限树
  getModulePermissTree: (param) => http.get(`${service}/sys/acl/module/menu/query/tree`, param),
  // 查询已授权模块权限树
  getCheckedMenuData: (param) => http.get(`${service}/sys/acl/module/menu/end/query/tree`, param),

  /*********************岗位管理***************************************************** */
  // 获取岗位列表
  getPostList: (param) => http.get(`${service}/sys/post/query/list`, param),
  // 分页获取岗位列表
  getPostPage: (param) => http.get(`${service}/sys/post/query/page`, param),
  // 新增岗位
  addPost: (param) => http.post(`${service}/sys/post/create`, param),
  // 删除岗位
  deletePost: (param) => http.post(`${service}/sys/post/remove`, param),
  // 获取岗位详情
  getPostInfo: (param) => http.get(`${service}/sys/post/query/detail`, param),
  // 修改岗位信息
  updatePost: (param) => http.post(`${service}/sys/post/modify`, param),
  // 批量删除岗位信息
  batchDeletePost: (param) => http.post(`${service}/sys/post/removeBatch`, param),
  // 修改岗位状态
  changePostStatus: (param) => http.post(`${service}/sys/post/modify/postStatus`, param),

  /*********************角色管理***************************************************** */
  // 获取角色列表
  getRoleList: (param) => http.get(`${service}/sys/role/query/list`, param),
  // 分页获取角色列表
  getRolePage: (param) => http.get(`${service}/sys/role/query/page`, param),
  // 角色新增
  createRole: (param) => http.post(`${service}/sys/role/create`, param),
  // 删除角色
  deleteRole: (param) => http.post(`${service}/sys/role/remove`, param),
  // 获取角色详情
  getRoleDetail: (param) => http.get(`${service}/sys/role/query/detail`, param),
  // 角色编辑
  editRoleDetail: (param) => http.post(`${service}/sys/role/modify`, param),
  // 修改角色状态
  changeRoleStatus: (param) => http.post(`${service}/sys/role/modify/roleStatus`, param),
  // 查询角色下所有关联用户
  getRoleUserList: (param) => http.get(`${service}/sys/role/query/roleUserList`, param),
  // 查询角色未关联用户
  getroleNotUserList: (param) => http.get(`${service}/sys/role/query/roleNotUserList`, param),
  //添加角色关联用户
  addRoleUser: (param) => http.post(`${service}/sys/role/create/roleUser`, param),
  //移除角色下某个用户
  RemoveRoleUser: (param) => http.post(`${service}/sys/role/remove/roleUser`, param),

  /*********************用户管理***************************************************** */
  // 分页获取用户列表
  getUserList: (param) => http.get(`${service}/sys/user/query/page`, param),
  // 新增用户
  addUser: (param) => http.post(`${service}/sys/user/create`, param),
  // 删除用户
  deleteUser: (param) => http.post(`${service}/sys/user/remove`, param),
  // 获取用户详情
  getUserInfo: (param) => http.get(`${service}/sys/user/query/detail`, param),
  // 修改用户信息
  updateUser: (param) => http.post(`${service}/sys/user/modify`, param),
  // 导出用户列表
  exportUserList: (param) => http.export(`${service}/sys/user/exporExcel`, param),
  // 批量删除系统用户
  batchDeleteUser: (param) => http.post(`${service}/sys/user/removeBatch`, param),
  // 重置密码
  resetPassword: (param) => http.post(`${service}/sys/user/reset/password`, param),
  // 修改用户状态
  changeUserStatus: (param) => http.post(`${service}/sys/user/modify/userStatus`, param),
  //修改用户排序
  updateUserOrder: (param) => http.post(`${service}/sys/user/updateUserOrderNum`, param),

  /*********************日志管理***************************************************** */
  // 分页查询登录日志
  getLoginLogsList: (param) => http.get(`${service}/sys/log/query/login/info/page`, param),
  // 分页查询操作日志
  getApiLogsList: (param) => http.get(`${service}/sys/log/query/api/page`, param),

  /*********************系统参数***************************************************** */
  // 分页查询系统管理
  getParamsList: (param) => http.get(`${service}/sys/config/query/page`, param),
  //创建系统参数
  addParams: (param) => http.post(`${service}/sys/config/create`, param),
  // 查询系统参数详情
  getParamsDetail: (param) => http.get(`${service}/sys/config/query/detail`, param),
  //编辑系统参数
  updateParams: (param) => http.post(`${service}/sys/config/modify`, param),
  //删除系统参数
  deleteParams: (param) => http.post(`${service}/sys/config/remove`, param)
};
